home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 14 / 014.d81 / alarm control (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  459b  |  13 lines

  1. 10 poke 56579,15:rem sets pb0-pb3 to output, pb4-pb7 to inputs
  2. 15 poke56578,peek(56578)or 4 :rem pa2 is made an ouput
  3. 20 for b=0 to 15
  4. 30 poke56577,b:rem generates binary count on pb0-pb3
  5. 40 a=peek(56577)and 16:rem senses state of input selected by count
  6. 45 if a=16 and b=15 then 90: rem jump to delay if alarm was triggered by sw 15
  7. 50 if a=16 then poke 56576,peek(56576)and251:rem alarm has been triggered
  8. 55 if a=16 then end
  9. 60 next b
  10. 70 goto 20
  11. 90 for c=1 to 50000:next c: rem delay for normal entrance
  12. 100 goto50
  13.